<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge，chrome=1">
    <meta name="renderer" content="webkit">
    <script src="../../../node_modules/jquery/dist/jquery.min.js"></script>
    <link rel="stylesheet" href="../../../node_modules/bootstrap/dist/css/bootstrap.min.css">
    <script src="../../../node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
    <script src="../../../node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
    <script src="../../../node_modules/vue/dist/vue.min.js"></script>
    <link rel="stylesheet" href="../../../node_modules/element-ui/lib/theme-chalk/index.css">
    <script src="../../../node_modules/element-ui/lib/index.js"></script>


    <!-- 自定义 -->
    <script src="../../../node_modules/mockjs/dist/mock.js"></script>
    <script src="../static/js/mock_config.js"></script>
    <script src="../static/js/index.js"></script>
    <link rel="stylesheet" href="../../index.css">

    <!-- PC -->
    <link rel="stylesheet" href="../static/css/QualityTracking.css" media="only screen and (max-height:1600px) ">
    <!-- 手机App
    <link rel="stylesheet" href="../static/css/ProduceApp.css" media="only screen and (min-height:1600px) "> -->
</head>

<body>
    <!--主体-->
    <div class="main clearfix" id="app">
        <div class="header">
            <header>
                <div class="navbar">
                    <div class="card_T">
                        <div class="card A" style="background-color:#0b87fa;color: white;">
                            <ul class="header-text">
                                <li>
                                    <h8 style="line-height: 78px;">生产指示追踪看板</h8>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div class="pc_content">
                        <div class="card_header">
                            <div class="card C" style="background-color: #33814e;">
                                <ul class="list-group list-group-flush">
                                    <li class="list-group-item">
                                        <h4>待结案</h4>
                                    </li>
                                    <li class="list-group-item1">
                                        <h3 id="WaitPrtQty">{{defaultDt1.length}}条</h3>
                                    </li>
                                </ul>
                            </div>
                            <div class="card C" style=" background: #33814e;">
                                <ul class="list-group list-group-flush">
                                    <li class="list-group-item">
                                        <h4>待异常分析</h4>
                                    </li>
                                    <li class="list-group-item1">
                                        <h3 id="Waitcompleted">{{aa}}条</h3>
                                    </li>
                                </ul>
                            </div>
                        </div>
                        <div class="card_header">
                            <div class="card C B" style="background:#33814e;">
                                <ul class="list-group list-group-flush">
                                    <li class="list-group-item">
                                        <h4>待措施确认</h4>
                                    </li>
                                    <li class="list-group-item1">
                                        <h3 id="Col8Qty1">{{bb}}条</h3>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </header>
        </div>


        <div class="main-left">
            <div class="border-container">
                <div>
                    <el-table class="aa" :data="defaultDt1" :default-sort="{prop: 'date', order: 'descending'}" stripe="true" ref="defaultDt1" :height=el_table_height1>
                        <el-table-column type="index" width="50" label="NO">
                        </el-table-column>
                        <el-table-column prop="" align="center" label="源单类型">
                        </el-table-column>
                        <el-table-column prop="" align="center" label="源单单号">
                        </el-table-column>
                        <el-table-column prop="" align="center"  label="产品代号">
                        </el-table-column>
                        <el-table-column prop="" align="center" label="产品名称">
                        </el-table-column>
                        <el-table-column prop="" align="center" label="不良种类">
                        </el-table-column>
                        <el-table-column prop="" align="center" label="不良分类">
                        </el-table-column>
                        <el-table-column  prop="" align="center"  label="处理方式">
                        </el-table-column>
                        <el-table-column prop="" align="center" label="问题描述">
                        </el-table-column>
                        <el-table-column prop="" align="center" label="发起日期">
                        </el-table-column>
                        <el-table-column prop="" align="center" label="处理纳期">
                        </el-table-column>
                        <el-table-column  prop="" align="center"  label="处理进度">
                        </el-table-column>
                    </el-table>
                </div>
                <span class="top-left border-span"></span>
                <span class="top-right border-span"></span>
                <span class="bottom-left border-span"></span>
                <span class="bottom-right border-span"></span>
            </div>
        </div>
    </div>

</body>

<script>
    new Vue({
        el: '#app',
        data() {
            return {
                el_table_height1: 900,
                defaultDt1: [],
                aa:0,
                bb:0,
            }
        },

        methods: {
            GetTabelDate(that) {
                // 生产指示追踪看板
                GetCodeData("VB22032914264147", "Get", "Goods").then(function(res) {
                    that.defaultDt1 = res.rows;
                    that.aa = 0;
                    that.bb = 0;
                    res.rows.forEach(element => {
                        if(element.PlanShowText =="延后"){
                            that.aa++;
                        };
                        if(element.Stauts == "close"){
                            that.bb++;
                        }
                    })
                })
            }
        },

        mounted() {
            //TableAotoRoll([this.$refs.defaultDt1])
            var that = this
            setTimeout(function() {
                that.GetTabelDate(that)
            }, 0);
            setInterval(function() {
                 that.GetTabelDate(that)
            }, 1000 * 60);
           that.aa=999
        }
    })
</script>



</html>